<template>
  <div class="recommend">
    <!-- 头部bannner -->
    <div class="headerBanner">
      <el-carousel :interval="4000" type="card" height="200px">
        <el-carousel-item
          class="carousel__item"
          v-for="(item, index) in banner"
          :key="index"
        >
          <img v-lazy="item.imageUrl" />
          <el-button size="mini" type="danger" class="el-button-banner">{{
            item.typeTitle
          }}</el-button>
        </el-carousel-item>
      </el-carousel>
    </div>

    <!-- 推荐歌单 -->
    <RecommendSong/>
    <!-- 独家发送 -->
    <SoleSong/>
    <!-- 最新音乐 -->
    <NewSong/>
    <!-- 推荐mv -->
    <MV/>
    <!-- 播客 -->
    <!-- <Blog/> -->
  </div>
</template>
<script>
import RecommendSong from './components/RecommendSong/RecommendSong.vue'
import SoleSong from './components/soleSong/soleSong.vue'
import NewSong from './components/NewSong/NewSong.vue'
import MV from './components/MV/mv.vue'
// import Blog from './components/Blog/Blog.vue'

export default {
  name: 'recommend',
  data() {
    return {
      banner: [],
    }
  },
  components: {
    RecommendSong,
    SoleSong,
    NewSong,
    MV,
    // Blog,
  },
  mounted() {
    this.bnner()
  },
  methods: {
    async bnner() {
      const res = await this.$API.RecommentSong.reqbanner()
      console.log(res)
      this.banner = res.banners
    },
  },
}
</script>

<style scoped>
.recommend {
  min-width: 1020px;
}
.headerBanner {
  margin-left: 20px;
}
.recommend >>> .el-carousel__item {
  border-radius: 10px;
}
.recommend >>> .el-carousel__item img {
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: -1;
}
.recommend >>> .el-carousel__indicator--horizontal .el-carousel__button {
  height: 10px;
  width: 10px;
  border-radius: 50%;
  background-color: red;
}
.el-carousel__indicator--horizontal .is-active {
  background-color: blue !important;
}
 .el-carousel__indicators--outside button {
  /* background-color: #C0C4CC; */
  opacity: 0.1;
}

.el-carousel__item .el-button-banner {
  float: right;
  margin-top: 175px;
}
</style>